package com.wangyi.fightimg.utils.http;

import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * @author wangYi
 *         访问服务器接口
 */

public interface RetrofitService {
    /**
     * post请求
     *
     * @param url
     * @param params
     * @return
     */
    @POST
    @FormUrlEncoded
    Call<ResponseBody> executePost(@Url String url, @FieldMap Map<String, String> params);

    /**
     * post请求
     *
     * @param url
     * @param params
     * @return
     */
    @GET
    Call<ResponseBody> executeGet(@Url String url, @QueryMap Map<String, String> params);

}
